//
//  UIBarButtonItem+UIBotton.swift
//  大波微博swift
//
//  Created by 大波 on 16/3/2.
//  Copyright © 2016年 zhaojin. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    convenience init(imageName: String) {
        
        let btn = UIButton()
        
        btn.setBackgroundImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        btn.setBackgroundImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        
        btn.sizeToFit()
        
        self.init(customView: btn)
    }
}






























